package com.zyj.springboot.srevice;

import com.zyj.springboot.model1.Banner;
import com.zyj.springboot.repository.BannerRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用来编写业务，核心复杂逻辑
 * @author : zhouyajun
 * @date : 2020-05-15
 */

@Service
public class BannerServiceImpl implements BannerService{

    @Autowired
    private BannerRepository bannerRepository;

    @Override
    public Banner getByName(String name) {
        return bannerRepository.findOneByName(name);
    }
}
